package boardgamer.yavalath.client;

import boardgamer.common.net.PlayerId;
import boardgamer.yavalath.common.YavalathPlayerState;

import static com.google.common.base.Preconditions.checkNotNull;

/**
 * @author garysoed
 */
public class YavalathPlayer extends PlayerId {

  private static final long serialVersionUID = 8221207164462142906L;

  private String name;
  private YavalathPlayerState.PlayerColor color;

  public YavalathPlayer(String name, YavalathPlayerState.PlayerColor color) {
    this.name = checkNotNull(name, "name");
    this.color = checkNotNull(color, "color");
  }

  public void setName(String name) {
    this.name = checkNotNull(name, "name");
  }

  @Override
  public String getName() {
    return name;
  }

  public void setColor(YavalathPlayerState.PlayerColor color) {
    this.color = checkNotNull(color, "color");
  }

  public YavalathPlayerState.PlayerColor getColor() {
    return color;
  }
}
